package com.smt.ejb3.tutoria.client;

import javax.naming.InitialContext;
import javax.naming.NamingException;

import com.smt.ejb3.tutoria.sessionbean.HelloWorld;

public class HelloWorldClient {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			InitialContext ctx = new InitialContext();

			HelloWorld helloWorld = (HelloWorld) ctx
					.lookup("HelloWorldBean/remote");

			System.out.println(helloWorld.sayHello("tester"));
		} catch (NamingException ex) {
			ex.printStackTrace();
		}
	}

}
